﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using blackhouse.JavaScript.JQuery;

namespace blackhouse.WebNemo.Web {
    public partial class Complete : System.Web.UI.Page {

        protected override void OnLoad(EventArgs e) {
            base.OnLoad(e);

            JQueryLibraries jql = new JQueryLibraries();
            jql.IncludeJQueryMain(true);

            this.IncludeJSQueryParams();
        }

        private void IncludeJSQueryParams() {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<script type=\"text/javascript\">");
            sb.AppendLine(" window.queryParams = new Array();");
            foreach (string qpKey in this.Request.QueryString.AllKeys) {
                sb.AppendFormat("   window.queryParams['{0}'] = '{1}';", qpKey, this.Request.QueryString[qpKey]);
                sb.AppendLine();
            }
            sb.AppendLine("</script>");

            this.ltlScript.Text = sb.ToString();
        }
    }
}